package com.imufe.chemicalenterprisedangerwarning.common;

/**
 * @author BaiBan
 * @since 2022/7/11
 */
public enum InfoCode {

    SUCCESS("00000", "请求处理成功"),
    FAIL("11111", "请求处理失败"),
    CLIENT_ERROR("A0001", "用户端错误"),
    VALIDATION_ERROR("A0101", "参数错误"),
    SYSTEM_ERROR("B0001", "系统错误"),

    /* 用户错误 */
    USER_NOT_LOGIN("B2001", "用户未登录"),
    USER_ACCOUNT_EXPIRED("B2002", "账号已过期"),
    USER_CREDENTIALS_ERROR("B2003", "密码错误"),
    USER_CREDENTIALS_EXPIRED("B2004", "密码过期"),
    USER_ACCOUNT_DISABLE("B2005", "账号不可用"),
    USER_ACCOUNT_LOCKED("B2006", "账号被锁定"),
    USER_ACCOUNT_NOT_EXIST("B2007", "账号不存在"),
    USER_ACCOUNT_ALREADY_EXIST("B2008", "账号已存在"),
    USER_ACCOUNT_USE_BY_OTHERS("B2009", "账号下线"),
    USER_NO_PERMISSION("B2010", "用户无权限"),

    NO_STAGING("B2021", "无暂存记录"),

    THIRD_PARTY_ERROR("C0001", "调用第三方服务错误");

    private final String code;
    private final String message;

    InfoCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
